package com.fanxuankai.boot.mqbroker.autoconfigure;

import java.util.Collections;
import java.util.Set;

/**
 * 清理配置
 *
 * @author fanxuankai
 */
public class Clear {
    /**
     * 是否开启
     */
    private boolean enabled = true;
    /**
     * 失效 ms，默认 7 天
     */
    private long expire = 604_800_000;
    /**
     * 清理超时 ms，默认 30 分支
     */
    private long timeout = 1_800_000;
    /**
     * cron 表达式
     */
    private String cronExpression = "0 0 6 * * ?";
    /**
     * 排除掉不清理
     */
    private Set<String> excludeEvents = Collections.emptySet();

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public long getExpire() {
        return expire;
    }

    public void setExpire(long expire) {
        this.expire = expire;
    }

    public long getTimeout() {
        return timeout;
    }

    public void setTimeout(long timeout) {
        this.timeout = timeout;
    }

    public String getCronExpression() {
        return cronExpression;
    }

    public void setCronExpression(String cronExpression) {
        this.cronExpression = cronExpression;
    }

    public Set<String> getExcludeEvents() {
        return excludeEvents;
    }

    public void setExcludeEvents(Set<String> excludeEvents) {
        this.excludeEvents = excludeEvents;
    }
}